Enable Deadlock Detection: set the trace flag 1222 using the DBCC TRACEON command. This will cause SQL Server to capture deadlock information in the error log.
A deadlock occurs when two or more tasks permanently block each other by each task having a lock on a resource that the other tasks are trying to lock.
SQLServer automatically logs all deadlocks. Can anyone help me to get sql query which will capture deadlocks data that is being collected, for a recent event.
A Microsoft SQL Server deadlock is a stalemate between two locked processes. When this occurs, all server activity stops, as each process waits for the ...